CREATE EXTERNAL TABLE jms_dm.dm_download_sign_abnomal_detail_dt(
  billcode string COMMENT ' 单号', 
  agent_code string COMMENT '代理区code', 
  agent_name string COMMENT '代理区name', 
  store_name string COMMENT '驿站nmae', 
  store_code string COMMENT '驿站code', 
  site_code string COMMENT '网点code', 
  site_name string COMMENT '网点name', 
  scan_time_in timestamp COMMENT '入库扫描时间', 
  scan_time_out timestamp COMMENT '出库扫描时间', 
  scan_time_take timestamp COMMENT '快件取出扫描时间', 
  signed_time timestamp COMMENT '签收扫描时间', 
  is_work_order tinyint COMMENT '是否客诉1是', 
  is_flas_sign tinyint COMMENT '是否虚假签收1是', 
  apply_type_code int COMMENT '退转类型4退件5转寄', 
  detail_type int COMMENT '导数类型 1有入库没有取出直接签收；2签收前有出库；3签收扫描后有入库或出库扫描\;4 签收删除', 
  is_sign_del int COMMENT '是否签收删除 1是', 
  sign_delete_time timestamp COMMENT '签收删除时间', 
  date_time date COMMENT '查询日期')
COMMENT '下载中心_虚假签收明细'
PARTITIONED BY ( dt string COMMENT '时间分区')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_download_sign_abnomal_detail_dt'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');


CREATE EXTERNAL TABLE jms_dm.dm_download_sign_abnomal_cnt_dt(
  agent_code string COMMENT '代理区code  ', 
  agent_name string COMMENT '代理区name', 
  waybill_cnt1 int COMMENT '导数类型1单量', 
  waybill_cnt2 int COMMENT '导数类型2单量', 
  waybill_cnt3 int COMMENT '导数类型3单量', 
  waybill_cnt4 int COMMENT '导数类型4单量', 
  repeat_cnt int COMMENT '重复单量', 
  is_work_order int COMMENT '客诉量', 
  is_flas_sign int COMMENT '客诉_虚假签收量', 
  sign_cnt int COMMENT '签收量', 
  date_time date COMMENT '查询日期')
COMMENT '下载中心_虚假签收汇总'
PARTITIONED BY ( dt string COMMENT '时间分区')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_download_sign_abnomal_cnt_dt'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');
